using Admin.NET.Core;
using MOKA.TPM.Entity;
using System.ComponentModel.DataAnnotations;

namespace MOKA.TPM.Service.Dto;

/// <summary>
/// 页面输出参数 （入库明细）
/// </summary>
public class PartInDOutput : PartInD
{
    /// <summary>
    /// 入库仓位 （字典名称）
    /// </summary>
    public string? LocationName { get; set; }

    /// <summary>
    /// 从产线返还 （字典名称）
    /// </summary>
    public string? FromLineName { get; set; }

    /// <summary>
    /// 关联对象等
    /// </summary>
    //public string? WePartyLevelName { get; set; }
}

/// <summary>
/// 单ID查询参数
/// </summary>
public class PartInDInput
{
    /// <summary>
    /// </summary>
    public Guid? Id { get; set; }
}

/// <summary>
/// 普通查询参数
/// </summary>
public class GetPartInDInput : BaseOrderInput
{
}

/// <summary>
/// 分页查询参数
/// </summary>
public class PagePartInDInput : BasePageInput
{
}

/// <summary>
/// 新增记录参数
/// </summary>
public class AddPartInDInput
{
    /// <summary>
    /// 业务号
    /// </summary>
    [Required, MaxLength(50)]
    public string BillNo { get; set; } = string.Empty;

    /// <summary>
    /// 物料编号
    /// </summary>
    [Required, MaxLength(50)]
    public string PartNo { get; set; } = string.Empty;

    /// <summary>
    /// 入库数量
    /// </summary>
    public decimal InNum { get; set; }

    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(10)]
    public string? BatchNumber { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    public decimal? Amount { get; set; }

    /// <summary>
    /// 入库仓位
    /// </summary>
    public Guid Location { get; set; }

    /// <summary>
    /// 从产线返还
    /// </summary>
    public Guid? FromLine { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }
}

/// <summary>
/// 更新参数
/// </summary>
public class UpdatePartInDInput
{
    /// <summary>
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 业务号
    /// </summary>
    [MaxLength(50)]
    public string BillNo { get; set; }

    /// <summary>
    /// 物料编号
    /// </summary>
    [MaxLength(50)]
    public string PartNo { get; set; }

    /// <summary>
    /// 入库数量
    /// </summary>
    public decimal InNum { get; set; }

    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(10)]
    public string? BatchNumber { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    public decimal? Amount { get; set; }

    /// <summary>
    /// 入库仓位
    /// </summary>
    public Guid Location { get; set; }

    /// <summary>
    /// 从产线返还
    /// </summary>
    public Guid? FromLine { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }
}

/// <summary>
/// 删除参数
/// </summary>
public class DeletePartInDInput
{
    /// <summary>
    /// </summary>
    public Guid Id { get; set; }
}

/// <summary>
/// 更新部分数据参数
/// </summary>
public class UpdateSomePartInDInput
{
    /// <summary>
    /// </summary>
    public Guid Id { get; set; }
}